/**
 * @Author: Rain
 * @Date: 2023/09/26 11:38:40
* @LastEditTime: 2024/01/03 23:11:54
 * @Description: Do Something
 */
import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/courseInfo',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/courseInfo/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/courseInfo',
    method: 'put',
    data
  })
}
/**
 * @description: 课程打卡配置
 * @param {*} data
 * @return {*}
 */
export function cursorClockCfg(data) {
  return request({
    url: 'api/courseClockConfig',
    method: data.clockConfigId ? 'put' : 'post',
    data
  })
}
/**
 * @description: 获取打卡设置
 * @param {*} data
 * @return {*}
 */
export function getCursorClockCfg(data) {
  return request({
    url: 'api/courseClockConfig',
    method: 'get',
    params: data
  })
}

export function getClockInit(data) {
  return request({
    url: 'api/courseClock/manager',
    method: 'post',
    data
  })
}
export default { add, edit, del, get }

export function updateSignRecord(data) {
  return request({
    url: 'api/courseClock',
    method: 'put',
    data
  })
}

export function get(data) {
  return request({
    url: 'api/courseInfo',
    method: 'get',
    params: data
  })
}
